<style>
.fui-list-inner .vip {
	background: #09ba07 none repeat scroll 0 0;
    color: #fff;
    position: absolute;
    margin-left: 0.2rem;
    height: 0.75rem;
    width: 0.75rem;
    vertical-align: top;
    z-index: 100;
    line-height: 1.1;
    text-align: center;
    border-radius: 0.85rem;
}
.item-up-content {background-color: #fff;border-radius: 10px;padding:0.5rem;margin:0.5rem}
.weui_cells {padding:0;margin-top:0}
.weui_cell_bd {padding:0;padding-bottom:0.3rem;padding-top:0.3rem;color:#999;font-size:0.6rem}
.weui_cell_hd {font-size:0.6rem;padding-bottom:0.3rem;padding-top:0.3rem;margin-right:0.3rem}
.item-ng {}
.item-ng .deleteitem {position: absolute;color:#000;margin-top:-1rem;right:0.5rem}
</style>
<div class='fui-page fui-page-current' ng-if="pagedata.op=='main'">
	<div class="fui-content">
		<div class="fui-cell-group fui-cell-click" style="margin-top:0">
				<div class="fui-cell">
					<div class="fui-cell-info">
						<div class="fui-cell-info text bold" style="font-size:1.2rem;color:#333">你的建议</div>
						<div class="subtitle" style="font-size:0.5rem;margin-top:0.3rem">{{pagedata.pluginset.snstitle ||'深圳小周邻城'}}</div>
					</div>
				</div>
		</div>
		<div class="content-block">
			<div class="item-up-content">
			<div style="border-bottom: 1px solid #ebebeb;color:#999;font-size:0.7rem;padding-bottom:0.3rem">
				<input class="weui_input" type="text" ng-model="pagedata.post.title" placeholder="建议标题">
			</div>
			<div class="item-ng">
				<div class="weui_cells weui_cells_form" style="padding:0;margin-top:0.3rem">
					<div class="weui_cell">
						<div class="weui_cell_bd weui_cell_primary" style="padding:0;padding-bottom:0.3rem">
							<div class="weui_label" style="margin-bottom:0.3rem"><span>内容</span> </div>
							<div class="weui_cell_hd">
								
								<textarea class="weui_textarea" ng-model="pagedata.post.content" placeholder="请输入您的建议" rows="3" style="font-size:0.56rem;color:#999"></textarea>
							</div>
						</div>
					</div>
				</div>
		
			</div>
			</div>
		</div>
		<div class="weui_btn weui_btn_primary" style="margin:0.5rem 2rem" href="javascript:" ng-click="pagedata.submit();">提交</div>
</div>
</div>
<script>
scope.pagedata.submit=function(){
	if(!scope.pagedata.post.title){
		scope.message('标题不能为空！','error');
		return false;
	}
	if(!scope.pagedata.post.content){
		scope.message('内容不能为空！','error');
		return false;
	}
	if(votestrlen(scope.pagedata.post.title)>40){
		scope.message('标题不能超过20个字！','error');
		return false;
	}
	var params={
		data:scope.pagedata.post,
		op:'post',
		callback:function(res){
			scope.message('提交成功','','/advise/');
		}
	};
	scope.post_json(params);
}
function votestrlen(str){
    var len = 0;
    for (var i=0; i<str.length; i++) { 
     var c = str.charCodeAt(i); 
    //单字节加1 
     if ((c >= 0x0001 && c <= 0x007e) || (0xff60<=c && c<=0xff9f)) { 
       len++; 
     } 
     else { 
      len+=2; 
     } 
    } 
    return len;
}
</script>
<div ng-include="sys_html('_footer')"></div>